<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>东家帮-用户登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="alternate icon" type="image/png" href="${base}/amazeui/assets/i/favicon.png">
<link rel="stylesheet" href="${base}/css/common.css"/>
<link rel="stylesheet" href="${base}/css/index2.css"/>
<base href="${base}/index/">
</head>
<body>
<div class="register">
	<img src="${base}/images/logo.png" class="logo" />
	<h1 >您好，欢迎你回来</h1>
	<form method="post" name="loginform"  id="loginform" class="am-form" action="${base}/index/login">
	<div class="line"><input type="text" name="phone" id="phone" placeholder="手机号" ></div>
	<div class="line"><input type="password" name="password" id="password" placeholder="6-18位英文或数字" ></div>
	<div class="line" style="margin-top: 36px;border:0px; margin-left: 5%;"><input type="button" id="submit"  onclick="login()" value="登录" class="btn" /></div>
	<div class="line" style="text-align:center;color:#ccc;width:90%;border:0px;font-size: 16px;"><a href="forgot" style="margin-right:10%;">忘记密码</a> | <a href="register" style="margin-left:10%;">注册账号</a> </div>
	</form>
</div>
</body>
<script type="text/javascript" src="${base}/js/common.js"></script>
<script src="${base}/js/jquery1.10.2.min.js"></script>
<script src="${base}/js/jquery.form.js"></script>
<script>
	function login() {
		var options = {
			success : showResponse2, //处理完成的回调函数
			resetForm : true
		};
		$("#loginform").ajaxSubmit(options);
	}
	function showResponse2(responseText) {
		alert(responseText);
		if (responseText.indexOf("操作成功") > -1){
			window.location.href = "${base}/index/main";	
		}
	}
</script>
</html>
